//
//  YHGameLayerLogin.cpp
//  ThunderWarriors
//
//  Created by mac on 12-12-23.
//
//

#include "YHGameLayerLogin.h"

IMPLEMENT_CREATE_CLASS(YHGameLayerLogin)

BEGIN_PROPERTY(YHGameLayerLogin)
END_PROPERTY()

YHGameLayerLogin::YHGameLayerLogin(){
    REGISTER_PROPERTY();
}
YHGameLayerLogin::~ YHGameLayerLogin(){
    RELEASE_DYNAMIC_PROPERTY(YHGameLayerLogin);
}

bool YHGameLayerLogin::init(){
    bool bRet = false;
    CCSize winSize = CCDirector::sharedDirector()->getWinSize();
    CCLayerColor* layerColor = CCLayerColor::create(ccc4(125,125,32,122), winSize.width/2, winSize.height/2);
    layerColor->ignoreAnchorPointForPosition(false);
    layerColor->setAnchorPoint(ccp(0.5,0.5));
    this->addChild(layerColor);
    layerColor->setPosition(ccp(winSize.width/2,winSize.height/2));
    CCSprite* spriteBg = CCSprite::create("fight1.png");
    spriteBg->setAnchorPoint(ccp(0.5, 0.5));
    spriteBg->setPosition(ccp(winSize.width/2, winSize.height/2));
    CCAssert(spriteBg != NULL, "");
    this->addChild(spriteBg);
    /*
    this->createDynamicPropertyByName("int", "MyInt");
    int *pValue = (int*) this->getDynamicPropertyByName("MyInt");
    printf("MyInt:%d", *pValue);
    int a = 5;
    this->setDynamicPropertyByName("int","MyInt", &a);
    printf("MyInt:%d", *pValue);*/
    
    bRet = true;
    return bRet;
}